package com.example.finaltool.model.db.info;

import com.baomidou.mybatisplus.annotation.TableName;
import com.example.finaltool.consts.Table;
import com.example.finaltool.model.RangeQuery;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @author dengbw
 * @date 2021/8/16 1:41 下午
 */
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@TableName(Table.INFO_RANGE)
public class Range {
    private Long consultId;
    private String infoType;
    private String releaseRange;
    private String rangeName;
    private String tenantId;
    private Long subTenantId;

    public Range(RangeQuery query) {
        consultId = query.getConsultId();
        infoType = query.getInfoType();
        releaseRange = String.valueOf(query.getReleaseRange());
        rangeName = query.getRangeName();
        tenantId = query.getTenantId();
        subTenantId = query.getSubTenantId();
    }
}
